package com.zbkj.admin.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 第三方支付秘钥信息 实体类。
 *
 * @author mybatis-flex-helper automatic generation
 * @since 1.0
 */
@Accessors(chain = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "第三方支付秘钥信息")
@TableName(value = "eb_pay_secret_key")
@Table(value = "eb_pay_secret_key")
public class EbPaySecretKeyEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Schema(description = "主键")
    @Id(keyType = KeyType.Auto)
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 第三方支付商户号
     */
    @Schema(description = "第三方支付商户号")
    @Column(value = "merchant_pay_no")
    @TableField(value = "merchant_pay_no")
    private Long merchantPayNo;

    /**
     * 支付方式名字
     */
    @Schema(description = "支付方式名字")
    @Column(value = "name")
    @TableField(value = "name")
    private String name;

    /**
     * 商户名字
     */
    @Schema(description = "商户名字")
    @Column(value = "merchant_name")
    @TableField(value = "merchant_name")
    private String merchantName;

    /**
     * 第三方支付产品号
     */
    @Schema(description = "第三方支付商户号")
    @Column(value = "product_id")
    @TableField(value = "product_id")
    private String productId;

    /**
     * 第三方支付商户公钥
     */
    @Schema(description = "第三方支付商户公钥")
    @Column(value = "merchant_pay_public_key")
    @TableField(value = "merchant_pay_public_key")
    private String merchantPayPublicKey;

    /**
     * 第三方支付商户私钥
     */
    @Schema(description = "第三方支付商户私钥")
    @Column(value = "merchant_pay_private_key")
    @TableField(value = "merchant_pay_private_key")
    private String merchantPayPrivateKey;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @Column(value = "create_time")
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 创建人
     */
    @Schema(description = "创建人")
    @Column(value = "create_by")
    @TableField(value = "create_by")
    private String createBy;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    @Column(value = "update_time")
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 更新人
     */
    @Schema(description = "更新人")
    @Column(value = "update_by")
    @TableField(value = "update_by")
    private String updateBy;

    /**
     * 是否有效(0: 有效，1：无效)
     */
    @TableLogic
    @Schema(description = "是否有效(0: 有效，1：无效)")
    @TableField(value = "del_fleg")
    @Column(value = "del_fleg", isLogicDelete = true)
    private Integer delFleg;

    /**
     * 第三方支付商户私钥
     */
    @Schema(description = "第三方支付商户私钥")
    @Column(ignore = true)
    @TableField(exist = false)
    private MultipartFile merchantPayPrivateKeyFile;

    /**
     * 第三方支付商户公钥
     */
    @Schema(description = "第三方支付商户公钥")
    @Column(ignore = true)
    @TableField(exist = false)
    private MultipartFile merchantPayPublicKeyFile;

    /**
     * 第三方支付商户私钥密码
     */
    @Schema(description = "第三方支付商户私钥密码")
    @Column(ignore = true)
    @TableField(exist = false)
    private String merchantPayPrivateKeyPassword;
}
